from utils import db_pool


def main():
    res = db_pool.query("select id,path from music_path")
    for i in res:
        _id = i["id"]
        _path = i["path"][18:]
        sql = f"update music_path set path='{_path}' where id={_id}"
        db_pool.execute_sql(sql)


if __name__ == "__main__":
    main()
